<template>
  <div class="welcome-screen">
    <h2>欢迎使用智能文件存储柜</h2>
    <p>请选择您需要的服务</p>
    
    <div class="action-buttons">
      <div class="action-btn deposit" @click="goToDeposit">
        <i class="fas fa-file-upload"></i>
        <span>我要存件</span>
      </div>
      <div class="action-btn pickup" @click="goToPickup">
        <i class="fas fa-file-download"></i>
        <span>我要取件</span>
      </div>
    </div>
    
    <div class="info-card" style="margin-top: 40px;">
      <div class="info-row">
        <span>空闲格子</span>
        <span><strong>18/36</strong></span>
      </div>
      <div class="info-row">
        <span>存件码有效期</span>
        <span><strong>72小时</strong></span>
      </div>
      <div class="info-row">
        <span>服务时间</span>
        <span><strong>全天24小时</strong></span>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'

const router = useRouter()

// 跳转到存件页面
const goToDeposit = () => {
  router.push('/deposit')
}

// 跳转到取件页面
const goToPickup = () => {
  router.push('/pickup')
}
</script>

<style scoped>
.welcome-screen {
  text-align: center;
  padding: 40px 20px;
}

.welcome-screen h2 {
  font-size: 2.2rem;
  margin-bottom: 10px;
  color: var(--primary);
}

.welcome-screen p {
  font-size: 1.2rem;
  margin-bottom: 40px;
  color: #bdc3c7;
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 30px;
}

.action-btn {
  width: 180px;
  height: 180px;
  background: linear-gradient(135deg, var(--primary), #2980b9);
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.action-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.action-btn i {
  font-size: 3.5rem;
  margin-bottom: 15px;
}

.action-btn span {
  font-size: 1.3rem;
  font-weight: bold;
}

.action-btn.deposit {
  background: linear-gradient(135deg, var(--secondary), #27ae60);
}

.action-btn.pickup {
  background: linear-gradient(135deg, var(--warning), #d35400);
}

.info-card {
  background-color: #4a6572;
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 20px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #5d6d7e;
}

.info-row:last-child {
  border-bottom: none;
}

@media (max-width: 768px) {
  .action-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .action-btn {
    width: 200px;
    height: 200px;
  }
}
</style>
